<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
body, html,#allmap {width: 100%;height: 100%;overflow: hidden;margin:0;} @media (max-device-width: 780px){#golist{display: block!important;}}#golist {display: none;}
</style>
 <script type="text/javascript" src="http://api.map.baidu.com/api?type=quick&ak=AZhueSBGC7UZmicz5mSzsZxt&v=2.0&services=true"></script>
<title>搜索区域内关键词</title>
</head>
<body>
<a id="golist" href="../demolist.htm">返回demo列表页</a>
<div id="allmap"></div>
</body>
</html>
<!-- <script type="text/javascript">

// 百度地图API功能
var map = new BMap.Map("allmap");            // 创建Map实例
map.centerAndZoom(new BMap.Point(116.274625,39.961627), 11);
map.addControl(new BMap.ZoomControl());          //添加地图缩放控件
var local = new BMap.LocalSearch(map, {
  renderOptions:{map: map}
});
var pStart = new BMap.Point(116.274625,39.961627);
var pEnd = new BMap.Point(116.367474,39.988609);
var bs = new BMap.Bounds(pStart,pEnd);   //自己规定范围
local.searchInBounds("银行", bs);

var polygon = new BMap.Polygon([
  new BMap.Point(pStart.lng,pStart.lat),
  new BMap.Point(pEnd.lng,pStart.lat),
  new BMap.Point(pEnd.lng,pEnd.lat),
  new BMap.Point(pStart.lng,pEnd.lat)
], {strokeColor:"blue", strokeWeight:6, strokeOpacity:0.5});

map.addOverlay(polygon);
</script >-->


<script type="text/javascript">
var map = new BMap.Map("container");            // 创建Map实例
var point = new BMap.Point(114.190664,30.465972);    // 创建点坐标
map.enableScrollWheelZoom();                  // 启用滚轮放大缩小。
map.enableKeyboard();                         // 启用键盘操作。
map.centerAndZoom(new BMap.Point(104.411873, 31.138152), 10);  
var marker = new BMap.Marker(point);        // 创建标注
map.addOverlay(marker);                          // 将标注添加到地图中
map.addControl(new BMap.NavigationControl());               // 添加平移缩放控件
map.addControl(new BMap.ScaleControl());                    // 添加比例尺控件
map.addControl(new BMap.OverviewMapControl());              //添加缩略地图控件
var menu = new BMap.ContextMenu();
var txtMenuItem = [
        {
            text:'放大',
            callback:function(){map.zoomIn()}
        },
        {
            text:'缩小',
            callback:function(){map.zoomOut()}
        }
    ];
    for(var i=0; i < txtMenuItem.length; i++){
        menu.addItem(new BMap.MenuItem(txtMenuItem[i].text,txtMenuItem[i].callback,100));
    }
    map.centerAndZoom(point,15);
    map.addContextMenu(menu);
    
map.addEventListener("click", function(e){
  document.getElementById("info").innerHTML = e.point.lng + ", " + e.point.lat;
});
var opts = {
  width : 80,     // 信息窗口宽度
  height: 30,     // 信息窗口高度
  title : "您好！"  // 信息窗口标题
}
var infoWindow = new BMap.InfoWindow("这里是我们的公司位置。", opts);  // 创建信息窗口对象
map.openInfoWindow(infoWindow, map.getCenter());      // 打开信息窗口
</script>